#include "PatientServiceHandler.h"

void PatientServiceHandler::open()
{
  reactor_->registerHandler(this, READ_EVENT);
}

void PatientServiceHandler::service()
{
  std::string cpr = peer().recv();
  Buffer::entry newEntry;
  
  newEntry.msg = cpr;
  newEntry.peer = &peer();

  buffer_->put(newEntry);
}
  
void PatientServiceHandler::handleEvent(Handle h, EventType et)
{
  service();
}




